package com.xupt.advertisement.Advertisement.repositories;

import com.xupt.advertisement.Advertisement.entities.User;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;


public interface UserRepository extends JpaRepository<User, Long> {
    User findById(Long id);

    List<User> getUserByEmail(String email);

    User findByEmail(String email);

    List<User> getUserByUsername(String userName);

    List<User> getUserByMobilePhone(String mobilePhone);

    List<User> getUserByUsernameContainingOrEmailContaining(String username, String email, Pageable pageable);
}
